-- Because this is the default settings, no locale check is done.

-- Key Binding Localization

BINDING_HEADER_TOGGLE_ON_NEXT_STRIKE    = "Toggle On Next Strike"
BINDING_NAME_TOGGLE_ON_NEXT_STRIKE      = "Toggles the 'on next strike' ability on macros."
BINDING_NAME_ENABLE_ON_NEXT_STRIKE      = "Enables the 'on next strike' ability on macros."
BINDING_NAME_DISABLE_ON_NEXT_STRIKE     = "Disables the 'on next strike' ability on macros."

local Localization = {
	["SlashCommands"] = {
		"/tons";
		"/toggleonnextstrike";
	};
	["Usage"] = {
		"Usage: /tons <command> [parameters]";
		" command is one of addmacro, removemacro, scan, toggle, enable, disable and list";
		" addmacro and removemacro requires an additional parameter which must be the macro name to be added / removed";
	};
	list = "list";
	scan = "scan";
	addmacro = "addmacro";
	removemacro = "removemacro";
	delmacro = "delmacro";
	deletemacro = "deletemacro";
	am = "am";
	rm = "rm";
	dm = "dm";
	toggle = "toggle";
	enable = "enable";
	disable = "disable";
};

local i = 1
local minlen = nil
while ( getglobal("SLASH_CAST"..i) ) do
	local str = getglobal("SLASH_CAST"..i)
	if not minlen or strlen(str) < strlen(minlen) then
		minlen = str
	end
	i = i + 1
	if i > 100 then break end
end
Localization["/cast"] = minlen

local ToggleOnNextStrike = ToggleOnNextStrike_Get_Instance();

ToggleOnNextStrike.L = function(index)
	if type(index) ~= "nil" then
		local value = Localization[index]
		if type(value) ~= "nil" then 
			return value
		else
			ToggleOnNextStrike:WarnOnce("TONS: No localization found for "..index)
		end
	end
	return index 
end 

